<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script>
    var gaProperty = 'UA-2577926-1';
    // Disable tracking if the opt-out cookie exists.
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) {
      window[disableStr] = true;
    }
    function gaOptout() {
      document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = true;
    }
    function gaOptoutRevoke() {
      document.cookie = disableStr + '=false; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = false;
    }
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-2577926-1', { 'anonymize_ip': true });
    </script>
    <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
    <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
    <script>
    window.addEventListener("load", function() {
      window.cookieconsent.initialise({
        'palette': {
          'popup': {
            'background': '#eaf7f7',
            'text': '#5c7291'
          },
          'button': {
            'background': '#56cbdb',
            'text': '#ffffff'
          }
        },
        'theme': 'edgeless',
        'type': 'opt-out',
        'onInitialise': function (status) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onStatusChange': function(status, chosenBefore) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onRevokeChoice': function() {
          gaOptoutRevoke()
        }
      })
    });
    </script>
    <title>OpenLayers v6.13.0 API - Class: TileGrid</title>
    <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <script src="scripts/bootstrap.bundle.min.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    <link type="text/css" rel="stylesheet" href="styles/site.css">
  </head>
  <body>
    <div class="container-fluid">
      <header class="navbar navbar-expand-sm navbar-dark mb-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="https://openlayers.org/"><img src="logo-70x70.png" alt="">&nbsp;OpenLayers</a>

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
          <ul class="navbar-nav ml-auto">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="docdropdown">
              <a class="dropdown-item" href="/en/latest/doc/">Docs</a>
              <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
                <a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
                <a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
                <a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
            </div>
          </li>
          <li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
          <li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap mr-1"></i>API</a></li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="codedropdown">
              <a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
              <a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
            </div>
           </li>
          </ul>
        </nav>
      </header>
      <div id="wrap" class="row">
        <div class="navigation col-md-4 col-lg-3">
          <div class="search-wrapper">
            <div class="search">
              <input id="search" type="text" autocomplete="off" class="form-control input-sm" placeholder="Search Documentation">
            </div>
          </div>
          <div class="navigation-list-wrapper">
            <ul class="navigation-list search-empty">
<li class="item item-class toggle-manual toggle-manual-show" data-longname="module:ol/tilegrid/TileGrid~TileGrid" data-name="ol/tilegrid/tilegrid">
    <span class="title toggle">
        <span class="fa fa-chevron-right mr-2 mt-1"></span>
        <span><a href="module-ol_tilegrid_TileGrid-TileGrid.html">ol​/tilegrid​/TileGrid</a></span>
    </span>
    <div class="member-list" data-type="methods">
        <span class="subtitle">Methods</span>
        <ul>
            <li data-name="foreachtilecoord"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#forEachTileCoord">forEachTileCoord</a>
            <li data-name="getextent"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getExtent">getExtent</a>
            <li data-name="getmaxzoom"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getMaxZoom">getMaxZoom</a>
            <li data-name="getminzoom"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getMinZoom">getMinZoom</a>
            <li data-name="getorigin"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getOrigin">getOrigin</a>
            <li data-name="getresolution"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getResolution">getResolution</a>
            <li data-name="getresolutions"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getResolutions">getResolutions</a>
            <li data-name="gettilecoordextent"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordExtent">getTileCoordExtent</a>
            <li data-name="gettilecoordforcoordandresolution"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordForCoordAndResolution">getTileCoordForCoordAndResolution</a>
            <li data-name="gettilecoordforcoordandz"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordForCoordAndZ">getTileCoordForCoordAndZ</a>
            <li data-name="gettilesize"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileSize">getTileSize</a>
            <li data-name="getzforresolution"><a href="module-ol_tilegrid_TileGrid-TileGrid.html#getZForResolution">getZForResolution</a>
        </ul>
    </div>
              <li class="loading">Loading …
            </ul>
          </div>
        </div>

        <div class="main col-md-8 col-lg-9">
            <h1 class="page-title" data-filename="module-ol_tilegrid_TileGrid-TileGrid.html">Class: TileGrid</h1>
            <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
              <button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
              This documentation is for OpenLayers v<span id="package-version">6.13.0</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
            </div>
            



<section class="content">

<header>
    <h2 class="my-3">
        <span class="ancestors"><a href="module-ol_tilegrid_TileGrid.html">ol/tilegrid/TileGrid</a>~</span>TileGrid
    </h2>
    <br>
    
      
      
        <pre class="prettyprint source"><code>import TileGrid from '<a href="module-ol_tilegrid_TileGrid.html">ol/tilegrid/TileGrid</a>';</code></pre>
      
    
    <div class="row p-3 ">
      <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
        <script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg" id="_carbonads_js"></script>
      </div>
    
      <div class="class-description col-lg-7 align-self-center pl-0"><p>Base class for setting the grid pattern for sources accessing tiled-image
servers.</p></div>
    
    </div>
</header>

<article>
    <div class="container-overview">
    

    
        <dl>
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="TileGrid">
        </div>
        <h4 class="name">
            new TileGrid<span class="signature">(options)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L64">line 64</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>options</code></td>
            
            
            

            <td colspan=2 class="description last">
                
                <p>Tile grid options.</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Extent for the tile grid. No tiles outside this
extent will be requested by <a href="module-ol_source_Tile-TileSource.html"><code>module:ol/source/Tile~TileSource</code></a> sources. When no <code>origin</code> or
<code>origins</code> are configured, the <code>origin</code> will be set to the top-left corner of the extent.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>minZoom</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
                    (defaults to 0)
                
            
            </td>

            

            <td  class="description last">
                
                <p>Minimum zoom.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>origin</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>The tile grid origin, i.e. where the <code>x</code>
and <code>y</code> axes meet (<code>[z, 0, 0]</code>). Tile coordinates increase left to right and downwards. If not
specified, <code>extent</code> or <code>origins</code> must be provided.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>origins</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a>></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Tile grid origins, i.e. where
the <code>x</code> and <code>y</code> axes meet (<code>[z, 0, 0]</code>), for each zoom level. If given, the array length
should match the length of the <code>resolutions</code> array, i.e. each resolution can have a different
origin. Tile coordinates increase left to right and downwards. If not specified, <code>extent</code> or
<code>origin</code> must be provided.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>resolutions</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Resolutions. The array index of each resolution needs
to match the zoom level. This means that even if a <code>minZoom</code> is configured, the resolutions
array will have a length of <code>maxZoom + 1</code>.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>sizes</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_size.html#~Size">module:ol/size~Size</a>></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Number of tile rows and columns
of the grid for each zoom level. If specified the values
define each zoom level's extent together with the <code>origin</code> or <code>origins</code>.
A grid <code>extent</code> can be configured in addition, and will further limit the extent
for which tile requests are made by sources. If the bottom-left corner of
an extent is used as <code>origin</code> or <code>origins</code>, then the <code>y</code> value must be
negative because OpenLayers tile coordinates use the top left as the origin.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>tileSize</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type"><a href="module-ol_size.html#~Size">module:ol/size~Size</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Tile size.
Default is <code>[256, 256]</code>.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>tileSizes</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_size.html#~Size">module:ol/size~Size</a>></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Tile sizes. If given, the array length
should match the length of the <code>resolutions</code> array, i.e. each resolution can have a different
tile size.</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        </dl>
    
    </div>

    
        <h3 class="subsection-title">Subclasses</h3>
        <ul>
          <li><a href="module-ol_tilegrid_WMTS-WMTSTileGrid.html">module:ol/tilegrid/WMTS~WMTSTileGrid</a>
            
          </li>
        </ul>
    

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="forEachTileCoord">
        </div>
        <h4 class="name">
            forEachTileCoord<span class="signature">(extent, zoom, callback)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L225">line 225</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Call a function with each tile coordinate for a given extent and zoom level.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Extent.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>zoom</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Integer zoom level.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>callback</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Function called with each tile coordinate.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getExtent">
        </div>
        <h4 class="name">
            getExtent<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L281">line 281</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the extent for this tile grid, if it was configured.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Extent.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getMaxZoom">
        </div>
        <h4 class="name">
            getMaxZoom<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L290">line 290</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the maximum zoom level for the grid.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Max zoom.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getMinZoom">
        </div>
        <h4 class="name">
            getMinZoom<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L299">line 299</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the minimum zoom level for the grid.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Min zoom.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getOrigin">
        </div>
        <h4 class="name">
            getOrigin<span class="signature">(z)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L309">line 309</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the origin for the grid at the given zoom level.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>z</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Integer zoom level.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Origin.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getResolution">
        </div>
        <h4 class="name">
            getResolution<span class="signature">(z)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L323">line 323</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the resolution for the given zoom level.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>z</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Integer zoom level.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Resolution.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getResolutions">
        </div>
        <h4 class="name">
            getResolutions<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{Array.&lt;number>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L332">line 332</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the list of resolutions for the tile grid.</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Resolutions.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getTileCoordExtent">
        </div>
        <h4 class="name">
            getTileCoordExtent<span class="signature">(tileCoord, <span class="optional">opt_extent</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L472">line 472</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the extent of a tile coordinate.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>tileCoord</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_tilecoord.html#~TileCoord">module:ol/tilecoord~TileCoord</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Tile coordinate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Temporary extent object.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Extent.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getTileCoordForCoordAndResolution">
        </div>
        <h4 class="name">
            getTileCoordForCoordAndResolution<span class="signature">(coordinate, resolution, <span class="optional">opt_tileCoord</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_tilecoord.html#~TileCoord">module:ol/tilecoord~TileCoord</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L494">line 494</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the tile coordinate for the given map coordinate and resolution.  This
method considers that coordinates that intersect tile boundaries should be
assigned the higher tile coordinate.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>coordinate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Coordinate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>resolution</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Resolution.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>tileCoord</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_tilecoord.html#~TileCoord">module:ol/tilecoord~TileCoord</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination module:ol/tilecoord~TileCoord object.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Tile coordinate.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getTileCoordForCoordAndZ">
        </div>
        <h4 class="name">
            getTileCoordForCoordAndZ<span class="signature">(coordinate, z, <span class="optional">opt_tileCoord</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{<a href="module-ol_tilecoord.html#~TileCoord">module:ol/tilecoord~TileCoord</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L585">line 585</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get a tile coordinate given a map coordinate and zoom level.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>coordinate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">module:ol/coordinate~Coordinate</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Coordinate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>z</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Zoom level.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>tileCoord</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_tilecoord.html#~TileCoord">module:ol/tilecoord~TileCoord</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Destination module:ol/tilecoord~TileCoord object.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Tile coordinate.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getTileSize">
        </div>
        <h4 class="name">
            getTileSize<span class="signature">(z)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number|<a href="module-ol_size.html#~Size">module:ol/size~Size</a>}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L611">line 611</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the tile size for a zoom level. The type of the return value matches the
<code>tileSize</code> or <code>tileSizes</code> that the tile grid was configured with. To always
get an <a href="module-ol_size.html#~Size"><code>module:ol/size~Size</code></a>, run the result through <a href="module-ol_size.html#.toSize"><code>module:ol/size.toSize</code></a>.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>z</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Z.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Tile size.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getZForResolution">
        </div>
        <h4 class="name">
            getZForResolution<span class="signature">(resolution, <span class="optional">opt_direction</span>)</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{number}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/tilegrid/TileGrid.js#L650">line 650</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>resolution</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Resolution.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>direction</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type"><a href="module-ol_array.html#~NearestDirectionFunction">module:ol/array~NearestDirectionFunction</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>If 0, the nearest resolution will be used.
    If 1, the nearest higher resolution (lower Z) will be used. If -1, the
    nearest lower resolution (higher Z) will be used. Default is 0.
    Use a <a href="module-ol_array.html#~NearestDirectionFunction"><code>module:ol/array~NearestDirectionFunction</code></a> for more precise control.</p>
<p>For example to change tile Z at the midpoint of zoom levels</p>
<pre class="prettyprint source lang-js"><code>function(value, high, low) {
  return value - low * Math.sqrt(high / low);
}</code></pre></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Z.
<br />

    

    
</dd>

        </dl>
    

    

    
</article>

</section>




        </div>
      </div>
      <script>prettyPrint();</script>
      <script src="scripts/linenumber.js"></script>
      <script src="scripts/main.js"></script>
    </div>
  </body>
</html>